export interface FormField {
  id: string
  type: string
  label: string
  placeholder?: string
  required?: boolean
  defaultValue?: any
  rules?: any[]
  options?: Array<{ label: string; value: any }>
  [key: string]: any
}

export interface FormSchema {
  fields: FormField[]
  layout?: any
  rules?: any
}

export interface DataSource {
  id: string
  name: string
  type: 'static' | 'api' | 'database'
  config: any
  data: any[]
}

export interface MaterialItem {
  type: string
  name: string
  icon: string
  category: string
  defaultProps: Partial<FormField>
  component: any
}

export interface DesignerState {
  currentForm: FormSchema
  selectedField: FormField | null
  dataSources: DataSource[]
  materials: MaterialItem[]
}